<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
    <style type="text/css">
    body {
    background-image: url("heart.gif");;
    background-size: 100%;
    background-repeat: no-repeat;
}
 
#login_frame {
    width: 400px;
    height: 260px;
    padding: 13px;
 
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -200px;
    margin-top: -200px;
 
    background-color: rgba(240, 255, 255, 0.5);
 
    border-radius: 10px;
    text-align: center;
}
 
form p > * {
    display: inline-block;
    vertical-align: middle;
}
 
#image_logo {
    width: 400px;
    height: 260px;
}
 
.label_input {
    font-size: 14px;
    font-family: 瀹嬩綋;
 
    width: 65px;
    height: 28px;
    line-height: 28px;
    text-align: center;
 
    color: white;
    background-color: #3CD8FF;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
 
 #btn_register {
       font-size: 14px;
    font-family: 瀹嬩綋;
 
    width: 120px;
    height: 28px;
    line-height: 28px;
    text-align: center;
 
    color: white;
    background-color: #3BD9FF;
    border-radius: 6px;
    border: 0;
 
    float: left;
}
.text_field {
    width: 278px;
    height: 28px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border: 0;
}
 
#btn_login {
    font-size: 14px;
    font-family: 瀹嬩綋;
 
    width: 120px;
    height: 28px;
    line-height: 28px;
    text-align: center;
 
    color: white;
    background-color: #3BD9FF;
    border-radius: 6px;
    border: 0;
 
    float: left;
}
 
#forget_pwd {
    font-size: 12px;
    color: white;
    text-decoration: none;
    position: relative;
    float: right;
    top: 5px;
 
}
 
#forget_pwd:hover {
    color: blue;
    text-decoration: underline;
}
 
#login_control {
    padding: 0 28px;
}
    </style>
</head>
 
<body>
<%--登陆检测--%>
<script type="text/javascript">
function check(form) {
	if(form.Name.value==""||form.Password.value==""){
		alert("用户名或密码为空！");
		return false;}}
</script>
<%--登陆失败 --%>
<%
if(session.getAttribute("loginfalse")!=null){
%>
<script type="text/javascript">
alert("${loginfalse}");
</script>
<%session.removeAttribute("loginfalse");	} %>
<%--登陆界面 --%>
<div id="login_frame">
    <img id="image_logo" src="flour.jpg" >
    <form method="post" action="../login.do" onsubmit="return check(this)">
        <p><label class="label_input">用户名</label><input type="text" id="Name" name="Name" class="text_field"/></p>
        <p><label class="label_input">密码</label><input type="password" id="Password" name="Password" class="text_field"/></p>
 
        <div id="login_control">
            <input type="submit" id="btn_login" value="登录" />
            
           <span style="color: white;font-size: small;">Not a member yet?</span>
            
           <a id="forget_pwd" href="Register.jsp" style="color: blue;"> Go and sign up </a>
        </div>
    </form>
</div>
 
</body>
